CC = $(CCACHE) g++

INCLUDE = -I./include -I/usr/local/mysql/include/mysql
LIBDIR = -L./lib

CFLAGS = -Wall -g -pipe -D_NEW_LIC -D_GNU_SOURCE -fPIC -D_REENTRANT -DDEBUG

LIB = -ldl -rdynamic -lpthread -lrt /usr/local/mysql/lib/mysql/libmysqlclient.a -lz

LDFLAGS =  $(CFLAGS) $(INCLUDE) $(LIBDIR) $(LIB)

OO = Common.o Options.o Log.o Net.o 930_logic.o mm_framework.o 

BIN = 930_main

all: $(OO) $(BIN)
.cpp.o:
	$(CC)  $(CFLAGS) -c  $(INCLUDE) $<

%:%.cpp $(OO) $(DEP_LIB)
	$(CC) $(CFLAGS) -o $@ $< $(OO) $(LDFLAGS)

clean:
	rm -f *.o
	rm -f $(BIN)

